package com.cskaoyan.mapper;

import com.cskaoyan.bean.MarketRole;
import com.cskaoyan.bean.roleBo.RoleBo2;
import com.cskaoyan.bean.roleVo.Children2;
import com.cskaoyan.bean.roleVo.RoleCreateVo;
import com.cskaoyan.bean.roleVo.RoleOptionVo;
import com.cskaoyan.bean.roleVo.RolePermissionsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author Austin Hsu
 * @Date 2022/9/9 23:03
 */
public interface MarketMyRoleMapper {


    void insert(@Param("s") RoleBo2.Data.SystemPermissions systemPermission, @Param("c")RoleBo2.Data.SystemPermissions.ChildrenX child, @Param("c2")RoleBo2.Data.SystemPermissions.ChildrenX.Children child2);

    void insert2(@Param("s") String[] s);

    List<MarketRole> query(@Param("name")String name, @Param("sort")String sort, @Param("order")String order);

    List<MarketRole> query2( String sort, String order);

    void insert3(@Param("r") MarketRole marketRole);

    List<RolePermissionsVo> queryRolePermissions();

    List<Children2> queryApiIdByCata2(String s);

    List<String> queryAssignedPermissionsByRoleId(int i);

    void deletePermissionByRoleId(int roleId);

    void insertPermissionsByRoleId(@Param("p") String permission, @Param("r") int roleId);

    void updateRole(@Param("r") MarketRole marketRole);

    void deleteRole(@Param("r")MarketRole marketRole);

    int queryCountRoleOptions();

    List<RoleOptionVo> queryRoleOptions();
}
